package com.xp.interview.model;

import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.annotation.Id;

/**
 * Created by xp on 15/10/14.
 */

@Document(collection = "notes")
public class NoteModel {

    @Id
    private String id;

    private String title;
    private String content;

    @PersistenceConstructor
    public NoteModel(String title,String content){
        this.title = title;
        this.content = content;
    }

    public String getTitle() {
        return title;
    }

    public String getContent() {
        return content;
    }

    public String getId() {
        return id;
    }
}
